#ifndef OBJECT
#define OBJECT

#include "Vec2d.hpp"

class Object {
    public:
        // Constructors {{{
        Object(char* new_label, Vec2d new_pos, Vec2d new_vel, double new_m);
        Object(char* new_label, double new_x, double new_y, double new_vx, double new_vy, double new_m);
        Object(char* new_label, bool new_is_star, double new_x, double new_y, double new_vx, double new_vy, double new_m);
        Object();
        // }}}
        // Getters {{{
        Vec2d getPos() { return pos; };
        double getX() { return pos.x; };
        double getY() { return pos.y; };
        Vec2d getVel() { return vel; };
        double getVelX() { return vel.x; };
        double getVelY() { return vel.y; };
        double getVelLength() { return vel.length(); };
        double getM() { return m; };
        char* getLabel() { return label; };
        double getTemp() { return temp; };
        bool isStar() { return is_star; };
        double distanceTo(Object obj2);
        // }}}
        // Setters {{{
        void setPos(Vec2d new_pos) { pos = new_pos; };
        void MoveBy(Vec2d d) { pos.x += d.x; pos.y += d.y; };
        void MoveBy(double dx, double dy) { pos.x += dx; pos.y += dy; };
        void setVel(Vec2d new_vel) { vel = new_vel; };
        void changeVelBy(Vec2d dv) { vel.x += dv.x; vel.y += dv.y; };
        void setM(double new_m) { m = new_m; };
        void setLabel(char* new_label);
        void setTemp(bool new_temp) { temp = new_temp; };
        // }}}
        // misc
        void writeOut(); // assumes it is supposed to write into std::cout
        // }}}
    private:
        Vec2d pos;
        Vec2d vel;
        double m;
        char label[10];
        double temp;
        bool is_star;
};

#endif
